package com.dr.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dr.mapper.UserMapper;
import com.dr.pojo.User;
import com.dr.service.UserService;

@Service
@Transactional
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper mapper;
	@Override
	public List<User> findUserList() {
		
		return mapper.findUserList();
	}

	@Override
	public User findUserById(Integer id) {
		
		return mapper.findUserById(id);
	}

	@Override
	public User findUserByName(String name) {
		
		return mapper.findUserByName(name);
	}

	@Override
	public int insertUser(User user) {
		
		return mapper.insertUser(user);
	}

	@Override
	public int deleteUser(User user) {
		
		return mapper.deleteUser(user);
	}

	@Override
	public int updateUser(User user) {
		
		return mapper.updateUser(user);
	}

}
